package com.teradata.olingo.processor.core.api;

import com.teradata.olingo.processor.core.query.GenericCountQuery;
import org.apache.olingo.server.api.ODataApplicationException;
import org.apache.olingo.server.api.uri.UriInfo;


public interface GenericODataPagingProvider {
  /**
   * Returns the page related to a given skiptoken.
   * If the skiptoken is not known the method returns null.
   * @param skiptoken
   * @return
   */
  GenericODataPage getNextPage(final String skiptoken);

  /**
   * Based on the query the provider decides if a paging is required and return the first page.
   * @param uriInfo
   * @return
   * @throws ODataApplicationException
   */
  GenericODataPage getFristPage(final UriInfo uriInfo, final Integer preferedPageSize, final GenericCountQuery countQuery) throws ODataApplicationException;

}
